//
//  XXSettingView.m
//  CameraDemo
//
//  Created by sanfang on 2017/2/18.
//  Copyright © 2017年 ziz. All rights reserved.
//

#import "XXSettingView.h"

@interface XXSettingView ()<UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong)UITableView *table;

@end


@implementation XXSettingView


- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setupView];
    }
    return self;
}

-(void)setupView
{
    
}

#pragma mark === lazyLoad ===

-(UITableView *)table
{
    if (!_table) {
        _table = [[UITableView alloc]initWithFrame:self.frame style:UITableViewStyleGrouped];
        _table.dataSource = self;
    }
    return _table;
}

#pragma mark  == UITableViewDatasource ==

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 0;
//    return self.titles.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSString *cellId = @"cellId";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (cell == nil)
    {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId];
    }
//    cell.textLabel.text= self.titles[indexPath.row];
//    cell.textLabel.font = font;
//    cell.detailTextLabel.font = font;
//    cell.textLabel.textColor = color;
//    cell.detailTextLabel.textColor = color;
    
    if (indexPath.row)
    {
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    else
    {
        cell.userInteractionEnabled = NO;
        cell.detailTextLabel.text = @"1.0";
    }
    return cell;
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
